<html>
<head><meta charset="utf-8"><title>RUST_BACKTRACE in tool builder · t-infra · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/index.html">t-infra</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/RUST_BACKTRACE.20in.20tool.20builder.html">RUST_BACKTRACE in tool builder</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="217567579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/RUST_BACKTRACE%20in%20tool%20builder/near/217567579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> flip1995 <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/RUST_BACKTRACE.20in.20tool.20builder.html#217567579">(Nov 22 2020 at 20:09)</a>:</h4>
<p>Is there a way to enabled <code>RUST_BACKTRACE=1</code> in the tools builder? I get an ICE from Clippy on the latest Clippy sync. But I can't reproduce this locally, neither in the Clippy CI with top-of-tree rustc.</p>
<p>I tried <a href="https://github.com/rust-lang/rust/pull/79228/commits/07092b8ada9e993a9f8ca166cd671d41d2df75a5">this</a>, but that  <a href="https://github.com/rust-lang/rust/runs/1438609164#step:24:8485">didn't print the backtrace</a>.</p>



<a name="217567744"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/RUST_BACKTRACE%20in%20tool%20builder/near/217567744" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/RUST_BACKTRACE.20in.20tool.20builder.html#217567744">(Nov 22 2020 at 20:13)</a>:</h4>
<p><span class="user-mention" data-user-id="264664">@flip1995</span> that looks like one of the shell scripts is messing with env variables, maybe?</p>



<a name="217568126"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/RUST_BACKTRACE%20in%20tool%20builder/near/217568126" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> flip1995 <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/RUST_BACKTRACE.20in.20tool.20builder.html#217568126">(Nov 22 2020 at 20:23)</a>:</h4>
<p>Yeah, I don't really get the build system of rustc. Too many complicated scripts :D</p>



<a name="217568188"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/RUST_BACKTRACE%20in%20tool%20builder/near/217568188" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/RUST_BACKTRACE.20in.20tool.20builder.html#217568188">(Nov 22 2020 at 20:24)</a>:</h4>
<p>oh I think the issue is you updated <code>.github/workflows/ci.yml</code></p>



<a name="217568191"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/RUST_BACKTRACE%20in%20tool%20builder/near/217568191" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/RUST_BACKTRACE.20in.20tool.20builder.html#217568191">(Nov 22 2020 at 20:24)</a>:</h4>
<p>it should be changed in src/ci/github-actions/ci.yml instead</p>



<a name="217568197"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/RUST_BACKTRACE%20in%20tool%20builder/near/217568197" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/RUST_BACKTRACE.20in.20tool.20builder.html#217568197">(Nov 22 2020 at 20:24)</a>:</h4>
<p>because github doesn't support yaml anchors, it's a whole thing</p>



<a name="217568209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/RUST_BACKTRACE%20in%20tool%20builder/near/217568209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/RUST_BACKTRACE.20in.20tool.20builder.html#217568209">(Nov 22 2020 at 20:25)</a>:</h4>
<p>make sure to run <code>./x.py run src/tools/expand-yaml-anchors</code> after</p>



<a name="217568264"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/RUST_BACKTRACE%20in%20tool%20builder/near/217568264" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> flip1995 <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/RUST_BACKTRACE.20in.20tool.20builder.html#217568264">(Nov 22 2020 at 20:26)</a>:</h4>
<p>I did. You always have to change both, otherwise CI will fail, as I learned today.</p>



<a name="217568286"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/RUST_BACKTRACE%20in%20tool%20builder/near/217568286" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> flip1995 <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/RUST_BACKTRACE.20in.20tool.20builder.html#217568286">(Nov 22 2020 at 20:27)</a>:</h4>
<p>It's also set in the <code>env</code> list of the step in the job: <a href="https://github.com/rust-lang/rust/runs/1438609164#step:24:10">https://github.com/rust-lang/rust/runs/1438609164#step:24:10</a></p>



<a name="217568876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/RUST_BACKTRACE%20in%20tool%20builder/near/217568876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/RUST_BACKTRACE.20in.20tool.20builder.html#217568876">(Nov 22 2020 at 20:41)</a>:</h4>
<p>You need to set it inside the docker container</p>



<a name="217568931"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/RUST_BACKTRACE%20in%20tool%20builder/near/217568931" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/RUST_BACKTRACE.20in.20tool.20builder.html#217568931">(Nov 22 2020 at 20:42)</a>:</h4>
<p>You can likely add ENV RUST_BACKTRACE 1 to src/ci/docker/host-x86_64/x86_64-tools/Dockerfile</p>



<a name="217568938"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/RUST_BACKTRACE%20in%20tool%20builder/near/217568938" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/RUST_BACKTRACE.20in.20tool.20builder.html#217568938">(Nov 22 2020 at 20:43)</a>:</h4>
<p>(I may have gotten path wrong, not at a computer right now)</p>



<a name="217569099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/RUST_BACKTRACE%20in%20tool%20builder/near/217569099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> flip1995 <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/RUST_BACKTRACE.20in.20tool.20builder.html#217569099">(Nov 22 2020 at 20:46)</a>:</h4>
<p>The path is correct, I'll try that, thanks!</p>



<a name="217572204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/RUST_BACKTRACE%20in%20tool%20builder/near/217572204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> flip1995 <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/RUST_BACKTRACE.20in.20tool.20builder.html#217572204">(Nov 22 2020 at 21:56)</a>:</h4>
<p>It worked, thanks!</p>



<a name="217572603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/RUST_BACKTRACE%20in%20tool%20builder/near/217572603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> flip1995 <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/RUST_BACKTRACE.20in.20tool.20builder.html#217572603">(Nov 22 2020 at 22:05)</a>:</h4>
<p>Is the rust CI run with debug assertions enabled?</p>



<a name="217572662"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/RUST_BACKTRACE%20in%20tool%20builder/near/217572662" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/RUST_BACKTRACE.20in.20tool.20builder.html#217572662">(Nov 22 2020 at 22:06)</a>:</h4>
<p>I don't <em>think</em> so but I could be wrong</p>



<a name="217572682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/RUST_BACKTRACE%20in%20tool%20builder/near/217572682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/RUST_BACKTRACE.20in.20tool.20builder.html#217572682">(Nov 22 2020 at 22:06)</a>:</h4>
<p>Some CI is, some CI is not</p>



<a name="217572705"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/RUST_BACKTRACE%20in%20tool%20builder/near/217572705" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/RUST_BACKTRACE.20in.20tool.20builder.html#217572705">(Nov 22 2020 at 22:07)</a>:</h4>
<p>Tools builder seems to have it enabled.</p>



<a name="217572926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/RUST_BACKTRACE%20in%20tool%20builder/near/217572926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> flip1995 <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/RUST_BACKTRACE.20in.20tool.20builder.html#217572926">(Nov 22 2020 at 22:13)</a>:</h4>
<p>That explains, why I get an ICE there, but not locally. IIUC I can enable them locally by setting <code>debug-assertions = true</code>? FYI <a href="https://github.com/rust-lang/rust/blob/c643dd2ec8fed2852f5eee8f776d657293a6a8f2/compiler/rustc_middle/src/ty/mod.rs#L1455">this</a> produces the ICE.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>